package com.silverbox.waimai.service.order.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.silverbox.waimai.entity.WaimaiSerialnumber;
import com.silverbox.waimai.mapper.WaimaiSerialnumberMapper;
import com.silverbox.waimai.service.order.WaimaiSerialnumberService;

@Service
public class WaimaiSerialnumberServiceImpl implements WaimaiSerialnumberService {

	@Autowired
	private WaimaiSerialnumberMapper waimaiSerialnumberMappper;

	@Override
	public List<WaimaiSerialnumber> getWaimaiSerialnumberByOrderNum(String orderNum) {
		return waimaiSerialnumberMappper.getWaimaiSerialnumberByOrderNum(orderNum);
	}

	@Override
	public int saveWaimaiSerialnumber(WaimaiSerialnumber record) {
		return waimaiSerialnumberMappper.insert(record);
	}

	@Override
	public int deleteWaimaiSerialNumberByOutTradeNo(String outTradeNo) {
		return waimaiSerialnumberMappper.deleteWaimaiSerialNumberByOutTradeNo(outTradeNo);
	}

}
